import org.keplerproject.luajava.LuaException;
import org.keplerproject.luajava.LuaObject;
import org.keplerproject.luajava.LuaState;
import org.keplerproject.luajava.LuaStateFactory;

public class LuaLogic {

	public static void main(String[] args) throws ClassNotFoundException, LuaException {
		LuaState l = LuaStateFactory.newLuaState();
		l.openLibs();

		l.LdoFile("res/LuaLogic.lua");

		LuaObject logic = l.getLuaObject("logic");
		IBusinessLogic jlogic = (IBusinessLogic) (logic.createProxy("IBusinessLogic"));
		jlogic.doLogic();
		int result1 = jlogic.clac(4, 2);
		System.out.println(result1);
		System.out.println(jlogic.clac(1, 2));

		l.pop(1);
	}
}
